using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class PauserPanel : MonoBehaviour
{
    private Animator anim;
    public GameObject button;

    private void Awake()
    {
        anim = GetComponent<Animator>();
    }
    public void ReTry()
    {
        Bird.IsMneu = false;
        Time.timeScale = 1.0f;
        SceneManager.LoadSceneAsync(1);
    }

    public void Pause()
    {
        Time.timeScale = 0;
    }

    public void Home()
    {
        Bird.IsMneu = false;
        Time.timeScale = 1.0f;
        SceneManager.LoadSceneAsync(0);
    }

    public void Resume()
    {
        button.SetActive(true);
        Bird.IsMneu=false;
    }

    public void Pausestart()
    {
        Bird.IsMneu = true;
        anim.SetBool("IsPause", true);
        button.SetActive(false);
    }

    public void ResumeStart()
    {
        anim.SetBool("IsPause", false);
        Time.timeScale = 1;
    }
}
